<?php
namespace app\home\model;
use think\Model;
class Images extends Model
{
    protected $pd = 'id';
    protected $schema = [
        'id'            => 'int',
        'image'         => 'string',
        'image_kind'    => 'string',
        'add_time'      => 'datetime',
        'update_time'   => 'datetime',
        'image_url'     => 'string',
        'oss_filename'  => 'string',
        'order'         => 'int',
        'alt'           => 'string',
    ];

    public function getImageKindAttr($value)
    {
        $types = [
            1=>'广告',
            2=>'二维码',
            3=>'标语',
            4=>'活动页',
        ];
        return $types[$value];
    }
}